
<template>
  <div>
    <div class="index-bg"></div>
    <el-row :gutter="40" :data="counts">
      <el-col :lg="6" :sm="12">
        <div class="grid-content bg-FFFFFF">
          <div class="content">城市总数</div>
          <div class="content_">{{ counts.cityCount }}</div>
        </div>
        </el-col>
      <el-col :lg="6" :sm="12">
        <div class="grid-content bg-FFFFFF">
          <div class="content">展示屏总数</div>
          <div class="content_">{{ counts.displayCount }}</div>
        </div>
      </el-col>
      <el-col :lg="6" :sm="12">
        <div class="grid-content bg-FFFFFF">
          <div class="content">LOGO总数</div>
          <div class="content_">{{ counts.logoCount }}</div>
        </div>
      </el-col>
      <el-col :lg="6" :sm="12">
        <div class="grid-content bg-FFFFFF">
          <div class="content">视频总数</div>
          <div class="content_">{{ counts.videoCount }}</div>
        </div>
      </el-col>
    </el-row>
   </div>
</template>

<script>
import {indexCount} from "@/api/cms/index";

export default {
  data() {
    return {
      counts: {},
    }
  },
  created() {
    this.getCounts();
  },
  methods: {
    getCounts() {
      indexCount().then(response => {
        this.counts = response.data
      })
    }
  }
}
</script>

<style scoped lang="scss">
  .index-bg{
    width: 100%;
    height: 100vh;
    background-color: #edf0f5;
    position: fixed;
  }
  .el-row {
    padding: 50px 20px 0 20px;
    &:last-child {
      margin-bottom: 0;
    }
  }
  .el-col {
    border-radius: 8px;
    // margin-left: 300px;
  }
  .bg-purple-dark {
    background: #99a9bf;
  }
  .bg-purple {
    // background: #d3dce6;
  }
  .bg-purple-light {
    background: #e5e9f2;
  }
  .grid-content {
    border-radius: 4px;
    min-height: 100px;
    padding: 20px;
    margin-bottom: 30px;
    // min-width: 200px;
  }
  .row-bg {
    padding: 10px 0;
    background-color: #f9fafc;
  }
  .content {
    font-size: 14px;
    color: #313131;
  }
  .content_{
    padding-top: 10px;
    font-size: 28px;
  }
  .bg-FFFFFF{
    background-color: #FFFFFF;
  }
</style>
